<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script>
	function test(a, b, c) {
		if (c) {
			a();
		} else {
			b(c);
		}
	}

	test(function() {
		console.log("first callback");
	}, function(c) {
		console.log("second callback" + c);
	}, 1);
</script>
</head>
<body>

</body>
</html>